package com.ruibang.glass.purchase.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruibang.glass.purchase.dto.FileInfoDTO;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 采购申请列表
 * </p>
 *
 * @author mameng
 * @since 2024-03-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(description = "采购申请列表")
@TableName(value = "g_purchase_special_application_list")
public class PurchaseSpecialApplicationList extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "编号")
    private String number;

    @ApiModelProperty(value = "部门")
    private String department;

    @ApiModelProperty(value = "部门Id")
    private String departmentId;

    @ApiModelProperty(value = "申请人")
    private String applicant;

    @ApiModelProperty(value = "申请人")
    private String applicantId;

    @ApiModelProperty(value = "采购名称")
    private String productName;

    @ApiModelProperty(value = "采购介绍")
    private String introduction;

    @ApiModelProperty(value = "让步原因")
    private String backReason;

    @ApiModelProperty(value = "使用说明")
    private String useReason;

    @ApiModelProperty(value = "申请时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime applicationTime;

    @ApiModelProperty(value = "审批状态")
    private String approvalStatus;

    @ApiModelProperty(value = "当前审批人")
    private String currentApprover;

    @ApiModelProperty(value = "采购跟踪信息")
    private String trackingInfo;

    @ApiModelProperty(value = "采购类型 1_紧急采购 2_非紧急采购")
    private String purchaseType;

    @ApiModelProperty(value = "验收人")
    private String acceptor;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "变更原始单据编号")
    private String originalDocChangeNo;
    @ApiModelProperty(value = "人员审批状态")
    private String status;

    @ApiModelProperty(value = "合同Id")
    private String contractId;

    @TableField(exist = false)
    private List<PurchaseRequestItems> purchasePurchaseRequestItemsList;

    @TableField(exist = false)
    private String menuId;

    @TableField(exist = false)
    private String processId;

    @TableField(exist = false)
    private List<String> fileIdList;

    @TableField(exist = false)
    private List<String> removeFileIdList;

    @TableField(exist = false)
    private List<String> removeProductIdList;

    @TableField(exist = false)
    private List<FileInfoDTO> fileList;


    @ApiModelProperty(value = "审批人")
    @TableField(exist = false)
    private String approveUser;

    @ApiModelProperty(value = "审批状态")
    @TableField(exist = false)
    private String approveStatus;

    @ApiModelProperty(value = "审批节点")
    @TableField(exist = false)
    private String nodeName;


    @ApiModelProperty(value = "1_采购立项 2_生产采购订单")
    @TableField(exist = false)
    private String spStatus;

    @ApiModelProperty(value = "供应商名称")
    @TableField(exist = false)
    private String supplierName;

    @ApiModelProperty(value = "供应商名称")
    @TableField(exist = false)
    private String supplierId;

    @ApiModelProperty(value = "合同名称")
    @TableField(exist = false)
    private String contractsName;

    @ApiModelProperty(value = "合同Id")
    @TableField(exist = false)
    private String contractsId;

    @ApiModelProperty(value = "验收人")
    @TableField(exist = false)
    private String acceptanceUser;

    @ApiModelProperty(value = "验收人Id")
    @TableField(exist = false)
    private String acceptanceUserId;

    @ApiModelProperty(value = "收货地址")
    @TableField(exist = false)
    private String receivingAddress;

    @ApiModelProperty(value = "付款方式")
    @TableField(exist = false)
    private String payMethod;

    @ApiModelProperty(value = "提醒时间")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime reminderTime;

    @ApiModelProperty(value = "交货时间")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deliveryTime;

    @ApiModelProperty(value = "联系方式")
    @TableField(exist = false)
    private String contactInformation;


}
